/*
**    Copyright (C) 2003-2011 Institute for Systems Biology
**                            Seattle, Washington, USA.
**
**    This library is free software; you can redistribute it and/or
**    modify it under the terms of the GNU Lesser General Public
**    License as published by the Free Software Foundation; either
**    version 2.1 of the License, or (at your option) any later version.
**
**    This library is distributed in the hope that it will be useful,
**    but WITHOUT ANY WARRANTY; without even the implied warranty of
**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
**    Lesser General Public License for more details.
**
**    You should have received a copy of the GNU Lesser General Public
**    License along with this library; if not, write to the Free Software
**    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*/

package org.systemsbiology.tsv;

import java.io.Serializable;

/**
 * Defines a header for a columnarily-proceeding series of {@link Field} objects
 *
 *  As with {@link Field}, we require our contained data type maintain {@link Comparable} and {@link Serializable}.
 *
 *  If you have many implementations of Header that you do not wish to tell apart (within your package, anyway),
 *  consider defining {@code serialVersionUID} and {@code Comparable<Header>} in a commonly-inherited abstract class.
 *  We don't do this for you here, because we'd *like* Header representations from separate packages to remain separate.
 *
 *  This representation deviates from the one presented in TSVLib. Specifically, it provides a named identifier for a
 *  particular field, expecting duplicate instances to have no consequence on the final data type (that is, it relies
 *  on stable iteration order and other simplifying assumptions at the expense of robustness). If you require a more
 *  robust, handle-addressable, globally-maintainable header that doesn't squash data together when thrown in a map or
 *  a hashtable, consider using the representations in TSVLib instead.
 *
 * @author trobinso
 */
public interface Header extends Comparable<Header>,Serializable {

    /*
     * Suggested constructor
     *  Allows for the specification of the contents of this implementer of Header at construction time

    public Header(String name);
     */

    /**
     * Set the name of an implementer of {@link Header}
     * @param name String name for this header
     */
    public void setName(String name);

    /**
     * Get the name from an implementer of {@link Header}
     * @return String name of this header
     */
    public String getName();
}
